<template>
    <el-container>
        <div>这是子组件。</div>
        <div>
            {{ parentMsg }}
        </div>
        <el-button @click="Click">   Click  </el-button>
    </el-container>
</template>

<script setup>
defineProps({
    parentMsg:String
})
// defineProps(['parentMsg']);

const $emit = defineEmits(['parentEvent']);
function Click(){
    $emit('parentEvent','hahha....,这是一条来自子组件的信息。')
}
</script>